<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
	<head>
		<script type="text/javascript" src="http://image.tianji.com/js/jquery.js">
		</script>
		
	</head>
	<body>
		
		<input type="checkbox" name="test" value="value" />
		
		<input type="checkbox" name="test" value="value" />
		
		<input type="checkbox" name="test" value="value" />
		
		<input type="checkbox" name="test" value="value" />
		
		<input type="checkbox" name="test" value="value" />
		
		<input type="checkbox" name="test" value="value" />
		
		<input type="checkbox" id="checkall" value="value" />
		<script type="text/javascript">
			//<![CDATA[
				console.log($("input"))
				$("input[name='test']").attr("checked","checked")
				$("#checkall").bind("click",function(){
					var check = $("#checkall").attr("checked");
					if(check == "checked"){
						$("input[name='test']").attr("checked","checked")
					}else{
						$("input[name='test']").removeAttr("checked");
					}
				})
			//]]>
		</script>
	</body>
</html>